package com.example.finaltool.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.finaltool.model.db.info.Consulting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author dengbw
 * @date 2021/8/11 10:38 上午
 */
@Mapper
public interface InfoConsultingMapper extends BaseMapper<Consulting> {

    @Select("SELECT DISTINCT i.sub_tenant_id FROM info_consulting i WHERE tenant_id = #{corpId} AND i.sub_tenant_id IS NOT NULL")
    List<String> getExistSubIds(String corpId);
}
